<?php
$data = unserialize($this->user->data);
?>
<form name="settings" method="post" action="/settings">
	<fieldset>
	<legend>User details</legend>
	<div>
		<?= $this->formLabel('address', 'Seller Address:') ?>
		<?= $this->formTextarea('address', isset($data->address) ? $data->address : '', array('rows' => 6, 'cols' => 20)) ?>
	</div>
	<div>
		<?= $this->formLabel('postcode', 'Post Code:') ?>
		<?= $this->formText('postcode', isset($data->postcode) ? $data->postcode : '') ?>

	</div>
	<div>
		<?= $this->formLabel('email', 'Email Address:') ?>
		<?= $this->formText('email', isset($data->email) ? $data->email : '') ?>

	</div>
	<div>
		<?= $this->formLabel('telephone', 'Telephone:') ?>
		<?= $this->formText('telephone', isset($data->telephone) ? $data->telephone : '') ?>
	</div>
	</fieldset>
	<fieldset>
	<legend>Item Defaults:</legend>
	<div>
		<?= $this->formLabel('paymentInstructions', 'Payment Instructions:') ?>
		<?= $this->formTextarea('paymentInstructions', isset($data->paymentInstructions) ? $data->paymentInstructions : '', array('rows' => 5, 'cols' => 40 )) ?>
	</div>
	<div>
		<?= $this->formLabel('description', 'Append to description:') ?>
		<?= $this->formTextarea('description', isset($data->description) ? $data->description : '', array('rows' => 5, 'cols' => 40)) ?>
	</div>
	<div>
		<?php 
			$data->paymentOptions = explode(',', isset($data->paymentOptions) ? $data->paymentOptions : '');			
		?>
		<?= $this->myCheckbox('payment', 'PayPal', $data->paymentOptions, 'Paypal: ', 'payment-paypal') ?> 
		<span id="span-paypalAddress"><?= $this->formLabel('paypalAddress', 'Paypal Email: ') ?>
		<?= $this->formText('paypalAddress', isset($data->paypalAddress) ? $data->paypalAddress : '') ?></span><br />
		<?= $this->myCheckbox('payment', 'PersonalCheck', $data->paymentOptions, 'Cheque: ') ?><br />
		<?= $this->myCheckbox('payment', 'PostalTransfer', $data->paymentOptions, 'Postal order: ') ?><br />
		<?= $this->myCheckbox('payment', 'Other', $data->paymentOptions, 'Other payment: ') ?><br />
	</div>
	</fieldset>
	<input name="submit" type="submit" value="Sync" /><input name="submit" type="submit" value="Save" />
</form>